package dome2;

public class Animal {
    public String name ;
    public int age ;
    //public int foot;

    static {
        System.out.println("Animal::static{}");
    }

    {
        System.out.println("Animal::{}");
    }

    public Animal(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("Animal带两个参数的构造方法");
    }

    public void eat(){
        System.out.println(name+"在吃饭......");
    }
}
